import React from "react";
import './TodoFooter.css';
import store from "../../../redux/store";
export default function TodoFooter() {
  //获取状态
  let {todos} = store.getState();
  return (
    <div className="todo-footer">
      <label>
        <input type="checkbox" />
      </label>
      <span>
        <span>已完成 {todos.filter(item => item.done).length}</span> / 全部 {todos.length}
      </span>
      <button className="btn btn-danger">清除已完成任务</button>
    </div>
  );
}
